package com.example.quartz.project.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;

import java.util.Date;

/**
 * @author 打小就爱笑捏
 * @date 2019/11/11
 */
public class JobOne implements Job {
    private static Integer sum = 1;/*记录执行次数*/

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {

        System.out.println("执行定时任务第" + sum + "次!" + new Date());
        sum++;
    }
}
